# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Kewl <xrjy@nygb.rh.bet(rot13)>
# Contributor: Lubomir 'Kuci' Kucera <kuci24-at-gmail-dot-com>

pkgname=python-pytimeparse
_pyname=${pkgname#python-}
pkgver=1.1.8
pkgrel=7
pkgdesc='A small library to parse various kinds of time expressions'
arch=(any)
url="https://github.com/wroberts/$_pyname"
license=(MIT)
depends=(python)
makedepends=(python-{build,installer,wheel}
             python-setuptools)
checkdepends=(python-nose)
_archive="$_pyname-$pkgver"
source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz")
sha256sums=('e86136477be924d7e670646a98561957e8ca7308d44841e21f5ddea757556a0a')

build() {
	cd "$_archive"
	python -m build -wn
}

check() {
	cd "$_archive"
	nosetests
}

package() {
	cd "$_archive"
	python -m installer -d "$pkgdir" dist/*.whl
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE.rst
}
